package com.mdd.admin.controller.coupon;

import com.mdd.admin.service.coupon.ICouponReceiveLogService;
import com.mdd.admin.validate.common.PageParam;
import com.mdd.admin.vo.coupon.CouponReceiveLogListVo;
import com.mdd.common.core.AjaxResult;
import com.mdd.common.core.PageResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping("/api/coupon/receive/log")
public class CouponReceiveLogController {

    @Resource
    private ICouponReceiveLogService iCouponReceiveLogService;

    @GetMapping("/list")
    public AjaxResult list(@Validated PageParam pageParam,
                           @RequestParam Map<String, String> params){
        PageResult<CouponReceiveLogListVo> list = iCouponReceiveLogService.list(pageParam, params);
        return AjaxResult.success(list);
    }
}
